home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 37 / IOPROG_37.ISO / SOFT / Multilizer.exe / disk1 / data1.cab / data1 / [Group9]VCL Source Standard / ivdemod.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-12  |  2.6 KB  |  111 lines

  1. unit IvDemoD;
  2.  
  3. {$I IVMULTI.INC}
  4.  
  5. interface
  6.  
  7. uses
  8. {$IFDEF WIN32}
  9.   Windows,
  10. {$ELSE}
  11.   WinTypes, WinProcs,
  12. {$ENDIF}
  13.   Classes, Graphics, Forms, Controls, Buttons, StdCtrls, ExtCtrls;
  14.  
  15. type
  16.   TIvDemoDialog = class(TForm)
  17.     Panel1: TPanel;
  18.     HeaderLabel: TLabel;
  19.     InfoLabel: TLabel;
  20.     CompanyLabel: TLabel;
  21.     AddressLabel: TLabel;
  22.     CityLabel: TLabel;
  23.     CountryLabel: TLabel;
  24.     PhoneLabel: TLabel;
  25.     FaxLabel: TLabel;
  26.     EmailLabel: TLabel;
  27.     PhoneValue: TLabel;
  28.     FaxValue: TLabel;
  29.     EmailValue: TLabel;
  30.     CreditCardLabel: TLabel;
  31.     WWWLabel: TLabel;
  32.     WWWValue: TLabel;
  33.     OKButton: TButton;
  34.     InternationalLabel: TLabel;
  35.     InternationalValue: TLabel;
  36.     DealerLabel: TLabel;
  37.  
  38.   public
  39.     constructor CreateValue(owner: TComponent; const key: String);
  40.   end;
  41.  
  42. implementation
  43.  
  44. {$R *.DFM}
  45.  
  46. uses
  47. {$IFDEF WIN32}
  48.   Registry,
  49. {$ELSE}
  50.   IniFiles,
  51. {$ENDIF}
  52.   IvCommon, IvDictio;
  53.  
  54. constructor TIvDemoDialog.CreateValue(owner: TComponent; const key: String);
  55. var
  56.   vendor: TIvVendor;
  57. {$IFDEF WIN32}
  58.   registry: TRegistry;
  59. {$ELSE}
  60.   iniFile: TIniFile;
  61. {$ENDIF}
  62. begin
  63.   inherited Create(owner);
  64.  
  65.   { Gets the vendor }
  66.  
  67.   vendor := ivveInnoview;
  68. {$IFDEF WIN32}
  69.   registry := TRegistry.Create;
  70.   try
  71.     registry.RootKey := HKEY_LOCAL_MACHINE;
  72.     if registry.OpenKey(key, False) and registry.KeyExists(VENDOR_C) then
  73.       vendor := TIvVendor(registry.ReadInteger(VENDOR_C));
  74.   except
  75.   end;
  76.   registry.Free;
  77. {$ELSE}
  78.   iniFile := TIniFile.Create(INI_FILE_C);
  79.   try
  80.     vendor := TIvVendor(iniFile.ReadInteger(SECTION_C, VENDOR_C, 0));
  81.   except
  82.   end;
  83.   iniFile.Free;
  84. {$ENDIF}
  85.  
  86.   case vendor of
  87.     ivveZac:
  88.     begin
  89.       InfoLabel.Caption := Translate('ZAC Ordering Information:');
  90.       CompanyLabel.Caption := 'ZAC Catalogs';
  91.       AddressLabel.Caption := '1090 Kapp Drive';
  92.       CityLabel.Caption := Translate('Clearwater, FL 34625');
  93.       CountryLabel.Caption := '';
  94.       PhoneValue.Caption := Translate('1-800-GO-DELPHI');
  95.       InternationalValue.Caption := Translate('813-298-1181');
  96.       FaxValue.Caption := Translate('813-461-5808');
  97.       EmailLabel.Caption := Translate('Internet:');
  98.       EmailValue.Caption := 'sales@zaccatalog.com';
  99.       WWWValue.Caption := 'http://www.zaccatalog.com';
  100.       CreditCardLabel.Caption := Translate('ZAC accepts Visa, MasterCard, American Express, Discover, Check, and Money Order');
  101.       DealerLabel.Caption := '';
  102.     end;
  103.   else
  104.     PhoneLabel.Caption := '';
  105.     PhoneValue.Caption := '';
  106.     InternationalLabel.Caption := Translate('Phone:');
  107.   end;
  108. end;
  109.  
  110. end.
  111.